window.onload = function() {
	fadeoutdiv("loginSuccess");
	fadeoutdiv("loginFail");
	
	document.getElementsByClassName('loginNameBox')[0].focus()
};

function fadeoutdiv(id) 
{ 
	fadeoutto = setTimeout("divOut(" + 5000 + ",'" + id + "')",5);
}

function divOut(opacity, id) { 
    opacity-=20;

    var os = document.getElementsByClassName(id)[0].style; 
    os.opacity = (opacity / 5001); 
    os.MozOpacity = (opacity / 5001); 
    os.KhtmlOpacity = (opacity / 5001); 
    os.filter = "alpha(opacity=" + opacity + ")";
    
    clearTimeout(fadeoutto);
	
    if (opacity > 0) {
		fadeoutto=setTimeout("divOut(" + opacity + ",'" + id + "')",10);
    } else {
		os.display="none";
    }
} 